package com.sunshine.lnuplus.model.Timetable;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

@Dao
public interface TimetableDao {
    @Query("SELECT * FROM TimetableEntity")
    LiveData<List<TimetableEntity>> getAllLessonLive();

    @Insert
    void insertLesson(TimetableEntity... timetableEntities);

    @Update
    void updateLesson(TimetableEntity... timetableEntities);

    @Delete
    void deleteLesson(TimetableEntity... timetableEntities);

    @Query("DELETE FROM TimetableEntity")
    void deleteAllLesson();
}
